package org.dreamwork.drawing.framework.impl;

import org.dreamwork.drawing.framework.IEdge;
import org.dreamwork.drawing.framework.IGraph;
import org.dreamwork.drawing.framework.IVertex;

import java.util.*;

/**
 * Created by IntelliJ IDEA.
 * User: seth.yang
 * Date: 2010-8-3
 * Time: 15:46:04
 */
public class DefaultGraph implements IGraph {
    protected List<IVertex> vertexes = new ArrayList<IVertex> ();
    protected Collection<IEdge> edges = new HashSet<IEdge> ();

    public void add (IVertex vertex) {
        vertexes.add (vertex);
    }

    public void add (IVertex... vertexes) {
        this.vertexes.addAll (Arrays.asList (vertexes));
    }

    public void add (List<IVertex> vertexes) {
        this.vertexes.addAll (vertexes);
    }

    public void add (IEdge edge) {
        edges.add (edge);
    }

    public void add (IEdge... edges) {
        this.edges.addAll (Arrays.asList (edges));
    }

    public void add (Collection<IEdge> edges) {
        this.edges.addAll (edges);
    }

    public void remove (IVertex vertex) {
        vertexes.remove (vertex);
    }

    public void remove (IVertex... vertexes) {
        this.vertexes.removeAll (Arrays.asList (vertexes));
    }

    public void remove (List<IVertex> vertexes) {
        this.vertexes.removeAll (vertexes);
    }

    public void remove (IEdge edge) {
        //To change body of implemented methods use File | Settings | File Templates.
    }

    public void remove (IEdge... edges) {
        //To change body of implemented methods use File | Settings | File Templates.
    }

    public void remove (Collection<IEdge> edges) {
        //To change body of implemented methods use File | Settings | File Templates.
    }

    public List<IVertex> getVertexes () {
        return null;  //To change body of implemented methods use File | Settings | File Templates.
    }

    public Collection<IEdge> getEdges () {
        return null;  //To change body of implemented methods use File | Settings | File Templates.
    }
}
